//
//  OHA_SimplyAFNRequest.h
//  OneHourArrvie
//
//  Created by Sunny on 16/12/13.
//  Copyright © 2016年 Sunny. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol reloadData <NSObject>

-(void)reloadAllData;

@end

typedef void(^PostRequestBlock)(id responseObject);
typedef void(^RequestFailedBlock)(id results);
typedef void (^uploadImageBlock)(void);
@interface base_SimplyAFNRequest : NSObject

@property(nonatomic,assign)id<reloadData>delegate;

/**
 网络数据请求

 @param dict         拼接的参数
 @param url          请求的URL
 @param successBlock 成功之后返回的block
 @param  failedBlock     失败回调
 */
+(void)getDataWithParams:(NSDictionary *)dict WithRequestURL:(NSString *)url WithBlock:(PostRequestBlock)successBlock withFailedBlock:(RequestFailedBlock)failedBlock;


+(void)uploadImageView:(NSDictionary *)dict WithRequestURL:(NSString *)url WithImageData:(NSData *)imageData WithImageName:(NSString *)imageName WithFileName:(NSString *)fileName WithImageDictionary:(NSMutableDictionary *)imageDictionary WithSuccessBlock:(uploadImageBlock)successBlock;

-(void)addQueneToGroupWithRequestURL:(NSString *)url WithParams:(NSDictionary *)dict
                           WithBlock:(PostRequestBlock)successBlock withFailedBlock:(RequestFailedBlock)failedBlock;

@end
